package java_thinking.unit_10._10_9;

/**
 * @Description : 内部类的继承
 * 内部类的构造器必须连接到指向其外围类对象的引用。并且指向外围类对象的引用必须被初始化，而在带出类中不再存在可连接的默认对象
 * @author: cww
 * @DateTime: 2019-03-16 14:51
 */

public class WithInner {
    class Inner{}
}

class InheritInner extends WithInner.Inner{
    //InheritInner(){} 默认构造器编译不会通过！！

    InheritInner(WithInner withInner){
        //指向外围类的对象的引用必须被初始化,否则编译无法通过
        withInner.super();
    }
    public static void main(String[] args){
        WithInner withInner = new WithInner();
        InheritInner inner = new InheritInner(withInner);
    }
}

